class Load implements RtlInsn {
    private RtlType type;
    private Temp addr;
    private Temp dest;

    public Load (RtlType _type, Temp _dest, Temp _addr){
	type =_type;
	addr =_addr;
	dest =_dest;
    }

    public RtlType getType (){
	return type;
    }

    public void setType (RtlType _type){
	type =_type;
    }

    public Temp getAddr (){
	return addr;
    }

    public void setAddr (Temp _addr){
	addr =_addr;
    }

    public Temp getDest (){
	return dest;
    }

    public void setDest (Temp _dest){
	dest =_dest;
    }

    public String toString(){
	return "load" + "(" + type + " " + 
	    dest + " " + addr + ")";
    }

    public RtlInstrId getRtlId()
    {
	switch(type)
	{
	    case BYTE:
		return RtlInstrId.LOAD_BYTE;
	    case LONG:
		return RtlInstrId.LOAD_WORD;
            default:
		//TODO: file later. throw new NoSuchFieldException();
		return null;
	}
    }

}
